#region using ...
using System;
using System.Diagnostics;
using System.Security.Permissions;
#endregion

namespace UnitedBinary.Core.Windows.Forms.Utility
{
	/// <include file='Utility.xml' path='/Docs/WebHelper/Class/*'/>
	public class WebHelper
	{
		/// <include file='Utility.xml' path='/Docs/WebHelper/ctor/*'/>
		public WebHelper()
		{
		}

		/// <include file='Utility.xml' path='/Docs/WebHelper/Navigate/*'/>
		[EnvironmentPermissionAttribute(SecurityAction.LinkDemand, Unrestricted = true)]
		public void Navigate(string url)
		{
			string path = Environment.GetFolderPath( System.Environment.SpecialFolder.System );
			string app = System.IO.Path.Combine( path, "rundll32.exe" );
			string arguments = "url.dll,FileProtocolHandler \"" + url + "\"";

			ProcessStartInfo startInfo = new ProcessStartInfo( app, arguments );
			Process.Start( startInfo );
		}
	}
}
